<!-- 用户管理 -->
<template>
  <div class="app-container">
    <el-row :gutter="20">
      <!-- 部门树 -->

      <!-- 用户列表 -->
      <el-col :lg="24" :xs="24">
        <div class="jiaqitop">
          <div class="titlel">
            <div class="titlel_box"></div>
            <div class="titlel_tt">项目管理</div>
          </div>
          <div class="rightbb">
            <el-button class="daochubtn" color="#ffffff">
              <img src="/src/assets/images/interactive／upload@2x.png" alt="" />
              <span>导出</span>
            </el-button>
            <el-button class="addtj" @click="popubool = true" color="#003779">
              <img src="/src/assets/images/Union@2x.png" alt="" />
              <span style="margin-left: 6px">添加</span>
            </el-button>
          </div>
        </div>

        <!-- 搜索区域 -->
        <div class="containerr">
          <el-input
            class="responsive-input"
            placeholder="请输入项目名称进行搜索"
            :prefix-icon="Search"
          />
          <el-button color="#003779" plain>
            <el-icon><Search /></el-icon>
            <span style="margin-left: 6px">查询</span>
          </el-button>
        </div>
        <div class="containers">
          <div class="center1">
            <div class="msgbox" v-if="false">
              <img src="/src/assets/images/Group@2x.png" alt="" />
              <span>暂无数据内容展示，选择人员后查看列表</span>
            </div>
            <el-table :data="tableData" border style="width: 100%; margin: auto; margin-top: 24px">
              <el-table-column prop="id" fixed align="center" label="ID" width="64" />
              <el-table-column prop="id" fixed align="center" label="编号" width="69" />
              <el-table-column prop="yijiclassname" align="center" label="一级项目" width="164" />
              <el-table-column prop="yijiclassname" align="center" label="二级项目" width="166" />
              <el-table-column prop="hangye" align="center" label="行业" width="166" />
              <el-table-column prop="hangye" align="center" label="部门" width="171" />
              <el-table-column prop="hangye" align="center" label="业务类型" width="177" />
              <el-table-column prop="hangye" align="center" label="权重" width="64" />
              <el-table-column prop="addtime" align="center" label="添加时间" width="205" />
              <el-table-column prop="date" align="center" label="状态" width="112">
                <template #default="scope">
                  <el-tag :type="scope.row.status === 1 ? 'success' : 'info'" disable-transitions>
                    {{ scope.row.status == 1 ? "显示" : "隐藏" }}
                  </el-tag>
                </template>
              </el-table-column>
              <el-table-column label="操作" fixed="right" align="center" width="215">
                <template #default="scope">
                  <span
                    @click="popubool = true"
                    style="font-weight: 400; font-size: 1rem; color: #165dff; cursor: pointer"
                  >
                    <span>编辑</span>
                    |
                    <span style="color: #f53f3f">删除</span>
                  </span>
                </template>
              </el-table-column>
            </el-table>

            <div class="yemmabox">
              <el-pagination
                :small="true"
                :pager-count="4"
                background
                layout="total, pager, next, jumper,slot"
                :total="20"
                style="position: relative"
              >
                <div class="sybox">首页</div>
                <div class="sybox1">尾页</div>
              </el-pagination>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
    <el-dialog v-model="popubool" :show-close="false" width="58.5rem" :modal="false" center>
      <template #header>
        <div class="popubox">
          <div class="backtop">
            <div class="topline">
              <div class="text">添加项目</div>
              <img
                src="/src/assets/images/微信图片_20250903150026_21_215.png"
                @click="popubool = false"
                alt=""
              />
            </div>
          </div>
          <div class="forms">
            <el-form :rules="rules" :model="ruleForm" label-width="120px" prop="name">
              <div style="display: flex; justify-content: space-between; align-items: center">
                <el-form-item label="一级分类：" prop="name">
                  <el-input v-model="ruleForm.name" placeholder="请输入一级分类" />
                </el-form-item>
                <el-form-item label="二级分类：" prop="name">
                  <el-input v-model="ruleForm.name" placeholder="请输入二级分类" />
                </el-form-item>
                <el-form-item label="编号:" prop="name">
                  <el-input v-model="ruleForm.name" placeholder="请输入编号" />
                </el-form-item>
              </div>
              <div style="display: flex; justify-content: space-between; align-items: center">
                <el-form-item label="行业:" prop="name">
                  <el-input v-model="ruleForm.name" placeholder="请输入行业" />
                </el-form-item>
                <el-form-item label="部门:" prop="name">
                  <el-select v-model="value" class="m-2" placeholder="请选择部门" size="large">
                    <el-option
                      v-for="item in options"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
                <el-form-item label="业务类型:" prop="name">
                  <el-select
                    v-model="value"
                    class="m-2"
                    placeholder="业务类型"
                    size="large"
                    style="width: 240px"
                  >
                    <el-option
                      v-for="item in options"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
              </div>
              <div style="display: flex; justify-content: space-between; align-items: center">
                <el-form-item label="角色:" prop="name">
                  <div style="display: flex" class="xialaboxs">
                    <el-select
                      v-model="value"
                      placeholder="请选择"
                      size="large"
                      style="width: 133px; border-right: 1px solid #c9cdd4"
                    >
                      <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                    <el-select
                      v-model="value"
                      placeholder="选择人员"
                      size="large"
                      style="width: 133px"
                    >
                      <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </div>
                </el-form-item>
                <el-form-item label=" ">
                  <div style="display: flex" class="xialaboxs">
                    <el-select
                      v-model="value"
                      placeholder="请选择"
                      size="large"
                      style="width: 133px; border-right: 1px solid #c9cdd4"
                    >
                      <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                    <el-select
                      v-model="value"
                      placeholder="选择人员"
                      size="large"
                      style="width: 133px"
                    >
                      <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </div>
                </el-form-item>
                <el-form-item label=" ">
                  <div style="display: flex" class="xialaboxs">
                    <el-select
                      v-model="value"
                      placeholder="请选择"
                      size="large"
                      style="width: 133px; border-right: 1px solid #c9cdd4"
                    >
                      <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                    <el-select
                      v-model="value"
                      placeholder="选择人员"
                      size="large"
                      style="width: 133px"
                    >
                      <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </div>
                </el-form-item>
              </div>

              <div style="display: flex; justify-content: space-between; align-items: center">
                <el-form-item label="权重：">
                  <el-input v-model="ruleForm.name" placeholder="请输入权重" />
                </el-form-item>
                <el-form-item label="状态：">
                  <el-radio-group size="small">
                    <el-radio label="1" size="32" border>隐藏</el-radio>
                    <el-radio label="2" size="32" border>显示</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item></el-form-item>
              </div>
            </el-form>
            <div class="btnss">
              <el-button @click="handleResetQuery">取消</el-button>
              <el-button type="primary" @click="handleQuery">确定</el-button>
            </div>
          </div>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup lang="ts">
import { Search } from "@element-plus/icons-vue";
const disabledDate = (time: Date) => {
  return time.getTime() > Date.now();
};
const ruleFormRef = ref();
const query = reactive({
  value1: "",
  value: "",
});
// do not use same name with ref

const popubool = ref(false);
const activenum = ref(0);
const options = [
  {
    value: "Option1",
    label: "Option1",
  },
  {
    value: "Option2",
    label: "Option2",
  },
  {
    value: "Option3",
    label: "Option3",
  },
  {
    value: "Option4",
    label: "Option4",
  },
  {
    value: "Option5",
    label: "Option5",
  },
];
const ruleForm = reactive<RuleForm>({
  name: "Hello",
  region: "",
  count: "",
  date1: "",
  date2: "",
  delivery: false,
  type: [],
  resource: "",
  desc: "",
});
const rules = reactive<FormRules<RuleForm>>({
  name: [
    { required: true, message: "Please input Activity name", trigger: "blur" },
    { min: 3, max: 5, message: "Length should be 3 to 5", trigger: "blur" },
  ],
});

const tableData = [
  {
    id: 1,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 1,
  },
  {
    id: 1,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 2,
  },
  {
    id: 1,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 2,
  },
  {
    id: 2,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 1,
  },
  {
    id: 4,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 1,
  },
  {
    id: 5,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 1,
  },
];
</script>
<style lang="scss" scoped>
.timebox {
  display: flex;
  align-items: center;
  margin-left: 22px;
  width: 22.5625rem;
  justify-content: space-between;
  .borderline {
    width: 19px;
    height: 1px;
    background: #86909c;
    border-radius: 1px 1px 1px 1px;
  }
  ::v-deep .el-select--large .el-select__wrapper {
    width: 18.6875rem;
    height: 2.75rem;
    background: #f7f8fa;
    border-radius: 6px 6px 6px 6px;
    border: none !important;
    box-shadow: none;
  }
}
.custom-date-picker-container {
  position: relative;
  width: 9.75rem;
}
.custom-date-picker-container :deep(.el-input__prefix) {
  display: none !important;
}

.custom-date-picker-container :deep(.el-input__suffix) {
  left: 12px;
  right: auto;
}

.custom-date-picker-container::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("/src/assets/images/微信图片_20250904101932_36_215.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 2;
}
::v-deep .el-table thead th {
  background: #f2f3f5;
  color: #1d2129;
}

::v-deep .el-dialog--center {
  padding: 0 !important;
}
::v-deep .el-dialog__header {
  border: none !important;
  padding: 0 !important;
}
.popubox {
  width: 100%;
  overflow: hidden;
  .forms {
    width: 53.5rem;
    margin: auto;
    margin-top: 32px;
    .xialaboxs {
    }
    .btnss {
      width: 100%;
      display: flex;
      justify-content: flex-end;
      .el-button {
        width: 118px;
        height: 41px;
      }
    }
    ::v-deep .el-form-item--label-right .el-form-item__label {
      text-align: left !important;
      display: block;
    }
    .el-form-item {
      display: block;
      width: 265px;
    }
    ::v-deep .el-radio__input.is-checked .el-radio__inner {
      background: #ffffff !important;
    }
    ::v-deep .el-radio__input.is-checked .el-radio__inner::after {
      background: #003779 !important;
      width: 8px;
      height: 8px;
    }
  }
  ::v-deep .el-select--large .el-select__wrapper {
    width: 100% !important;
  }
  .backtop {
    width: 100%;
    height: 54px;
    background: #e5e6eb;
    display: flex;
    align-items: center;
    .topline {
      width: 53.5rem;
      margin: auto;
      display: flex;
      justify-content: space-between;
      .text {
        font-family:
          PingFang SC,
          PingFang SC;
        font-weight: bold;
        font-size: 18px;
        color: #4e5969;
      }
      img {
        width: 24px;
        height: 24px;
      }
    }
  }
}
.yemmabox {
  margin-top: 19px;
  display: flex;
  align-items: center;
  font-family:
    PingFang SC,
    PingFang SC;
  margin-bottom: 22px;
  width: 546px;
  position: relative;
  .sybox {
    width: 61px;
    height: 24px;
    border-radius: 3px 3px 3px 3px;
    border: 1px solid #86909c;
    text-align: center;
    line-height: 24px;
    font-family:
      PingFang SC,
      PingFang SC;
    font-weight: 400;
    font-size: 14px;
    color: #86909c;
    position: absolute;
    margin-left: 62px;
  }

  .sybox1 {
    width: 61px;
    height: 24px;
    border-radius: 3px 3px 3px 3px;
    border: 1px solid #86909c;
    text-align: center;
    line-height: 24px;
    font-family:
      PingFang SC,
      PingFang SC;
    font-weight: 400;
    font-size: 14px;
    color: #86909c;
    position: absolute;
    right: 153px;
  }
}
::v-deep .btn-next {
  background-color: #fff !important;
  margin-left: 70px !important;
}

.gongtotal {
  font-weight: bold;
  font-size: 14px;
  color: #003779;
  margin-right: 24px;
}
::v-deep .el-pager li {
  min-width: 24px;
  height: 24px;
  margin: 0 14px;
  padding: 0 !important;
}

::v-deep .el-pagination.is-background .el-pager li {
  margin: 0 0px !important;
  margin-right: 14px !important;
}

.msgbox {
  width: 574px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family:
    PingFang SC,
    PingFang SC;
  font-weight: 400;
  font-size: 20px;
  margin: 45px auto;
  color: #003779;
}
.msgbox img {
  width: 574px;
  height: 452px;
  margin-bottom: 50px;
}
.jiaqitop {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .rightbb {
    display: flex;
    align-items: center;
    .daochubtn {
      width: 7rem;
      height: 2.75rem;
      border-radius: 6px 6px 6px 6px;
      border: 1px solid #86909c;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family:
        PingFang SC,
        PingFang SC;
      font-weight: 400;
      font-size: 0.9375rem;
      color: #4e5969;
      margin-right: 1.5rem;
      img {
        width: 1rem;
        height: 1rem;
      }
    }
    .addtj {
      width: 7rem;
      height: 2.75rem;
      border-radius: 6px 6px 6px 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family:
        PingFang SC,
        PingFang SC;
      font-weight: 400;
      font-size: 0.9375rem;
      color: #ffffff;
      img {
        width: 0.5625rem;
        height: 0.5625rem;
      }
    }
  }

  .titlel {
    display: flex;
    align-items: center;
    .titlel_box {
      width: 4px;
      height: 23px;
      background: #003779;
      border-radius: 0px 6px 6px 0px;
    }
    .titlel_tt {
      font-family:
        PingFang SC,
        PingFang SC;
      font-weight: bold;
      font-size: 1.375rem;
      color: #1d2129;
      margin-left: 9px;
    }
  }
}

.containers {
  width: 100%;
  background: #ffffff;
  overflow: hidden;
  border-radius: 16px 16px 16px 16px;
  margin-top: 1.25rem;
  padding: 0 1.5rem;
}
.containers .center1 {
  margin-top: 1.1875rem;
}
.top1 {
  width: 100%;
  height: 54px;
  background: #fff9ed;
  border-radius: 10px 10px 10px 10px;
  display: flex;
  align-items: center;
  font-family:
    PingFang SC,
    PingFang SC;
  font-weight: bold;
  font-size: 16px;
  color: #ff7d00;
  img {
    width: 20px;
    height: 20px;
    margin-left: 14px;
    margin-right: 10px;
  }
}
::v-deep .el-pagination__total {
  font-weight: bold;
  font-size: 14px;
  color: #003779;
  margin-right: 99px;
}
.containerr {
  width: 100%;
  height: 80px;
  background: #ffffff;
  border-radius: 12px 12px 12px 12px;
  display: flex;
  margin-bottom: 20px;
  align-items: center;
  margin-top: 24px;
  position: relative;
  ::v-deep .el-input {
    width: 18.6875rem;
    font-size: 1rem;
    height: 2.75rem;
    margin-left: 24px;
  }
  .daochubtn {
    width: 7rem;
    height: 2.75rem;
    background: #f7f8fa;
    border-radius: 6px 6px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family:
      PingFang SC,
      PingFang SC;
    font-weight: 400;
    font-size: 0.9375rem;
    color: #4e5969;
    position: absolute;
    right: 0%;
    margin-right: 24px;
  }
  .daochubtn img {
    width: 16px;
    height: 16px;
  }
  .el-button {
    width: 7.0625rem;
    height: 2.75rem;
    border-radius: 4px 4px 4px 4px;
    margin-left: 20px;
    display: flex;
    font-size: 0.9375rem;
    justify-content: center;
    align-items: center;
    img {
      width: 1.0625rem;
      height: 1.0625rem;
    }
  }
}

::v-deep .el-input__wrapper {
  background: #f7f8fa;
  box-shadow: none !important;
}
.borderline {
  width: 19px;
  height: 1px;
  background: #86909c;
  border-radius: 1px 1px 1px 1px;
}
::v-deep .el-date-editor.el-input {
  width: 9.75rem;
  height: 44px;
  background: #f7f8fa;
  border-radius: 6px 6px 6px 6px;
}

.timebox {
  display: flex;
  align-items: center;
  margin-left: 22px;
  width: 22.5625rem;
  justify-content: space-between;
  ::v-deep .el-input {
    margin-left: 0px !important;
  }
}

::v-deep .el-select--large .el-select__wrapper {
  width: 18.6875rem;
  height: 2.75rem;
  background: #f7f8fa;
  border-radius: 6px 6px 6px 6px;
  border: none !important;
  box-shadow: none;
}
.el-table {
  margin-top: 20px;
}
</style>
